'use strict';

define(['services'], function (services) {
    services.collection.register('DeleteService', ['$http', function ($http) {
        return {
            remove : function (collectionId, params, callback) {
                $http.get('/rest/collection/' + collectionId + '/delete', {
                    params: params
                }).success(function (data, status, headers, config) {
                    if (callback != null) {
                        callback(eval(data), status, headers, config);
                    }
                });
            }
        };
    }]);
});